package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.HomeSChatBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class HomeSecondMethods extends BaseMethods {

    private static HomeSecondMethods m_ins = null;

    public static HomeSecondMethods getInstance() {
        if (m_ins == null) {
            synchronized (HomeSecondMethods.class) {
                if (m_ins == null) {
                    m_ins = new HomeSecondMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Index/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void followlist(Subscriber<HomeSChatBean> subscriber,
                      int type ,int uid,String hashid,String city,String sex ,int page ) {
        Observable observable = initService().followlist(System.currentTimeMillis()+"",
                "d12ec5a23b774bc7ac2f4706b838d899",type,uid,hashid,city,sex,page
        );
        toSubscribe(observable, subscriber);
    }
}
